package com.nulldev.util.net.experimental.groupedudp.datagrams.explore;

import java.net.DatagramPacket;

import com.nulldev.util.net.experimental.groupedudp.DatagramTypes;
import com.nulldev.util.net.experimental.groupedudp.Encryptor;
import com.nulldev.util.net.experimental.groupedudp.datagrams.ADatagram;

/**
 *  Client request for servers to send info about themselves (not encrypted).
 */
public class ExploreRequest extends ADatagram {
    
    public ExploreRequest() {
        super(Encryptor.DUMMY, DatagramTypes.CLIENT_EXPLORE_REQUEST);
        this.data = createEmptyDatagram();
    }
    
    /**
     * Reconstructs UDPLib message datagram from received frame.
     * 
     * @param source received packet containing info about true length of datagram
     */
    public ExploreRequest(DatagramPacket source) {
        super(Encryptor.DUMMY, DatagramTypes.CLIENT_EXPLORE_REQUEST);
        this.data = source.getData();
    }

}
